package com.test1223;

public class Test20 {
    public static void main(String[] args) {

        // 打印如下数字矩阵

        //    1
        //   121
        //  12321
        // 1234321
        //123454321
        int n = 5;
        for (int h = 1; h <= n; h++) {
            for (int i = 1; i <= n - h; i++) {
                System.out.print(" ");

            }
            for (int i = 1; i <= h; i++) {
                System.out.print(i);
            }
            if(h!=1){
                for(int m=h-1;m>=1;m--){
                    System.out.print(m);
                }
            }
            System.out.println();
        }


    }
}